﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PLC.Forms
{
    public partial class LogForm : Form
    {
        public LogForm()
        {
            InitializeComponent();
        }
       
        private void button3_Click(object sender, EventArgs e)
        {
            if (System.IO.File.Exists(Application.StartupPath + @"\log.txt"))
            {
                // 显示日志信息
                try
                {
                    using (System.IO.StreamReader sr = new System.IO.StreamReader(Application.StartupPath + @"\log.txt", Encoding.UTF8))
                    {
                        textBox3.Text = sr.ReadToEnd();
                    }
                }
                catch
                {
                    
                }
               
            }
            else
            {
                MessageBox.Show("没有文件！");
            }
        }

       

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "nctit001")
            {
                groupBox1.Visible = true;
            }

        }
    }
}
